﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Text;

namespace PeisongWeb.admin
{
    public partial class sellerAssessment_Allist : adminPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (hasPermission("FD", 1))
                {
                    bind();
                }
                else
                {
                    Library.Script.ClientMsg("没有操作权限");
                }
            }
        }
        void bind()
        {
            DataSet ds = DAL.DbHelper.ExecuteDataSetPageSize("*", "vw_AssessmentWeekByDateTime", string.Empty, "", "inputDt desc", this.AspNetPager1.PageSize, this.AspNetPager1.CurrentPageIndex);
            AspNetPager1.RecordCount = Convert.ToInt32(ds.Tables[0].Rows[0][0]);
            rpt_list.DataSource = ds.Tables[1];
            rpt_list.DataBind();
        }

        protected void AspNetPager1_PageChanged(object sender, EventArgs e)
        {
            bind();
        }

        protected void rpt_list_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            //if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
            //{
            //    if (e.CommandName == "linkCommandName")
            //    {
            //        string[] Argument=e.CommandArgument.ToString().Split(',');
            //        DateTime Sdt = Convert.ToDateTime(Argument[0]);
            //        DateTime Edt = Convert.ToDateTime(Argument[1]);
            //        //Library.Script.ClientMsg(string.Format("{0},{1}",Sdt,Edt));


            //    }
             
            //}
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            ScriptManager1.AddScript(string.Format("window.open('sellerAssessmentByWeekToday_report.aspx','_blank')"));
        }
    }
}
